package com.wangxinyuchuan.demo.strategy;

import com.wangxinyuchuan.demo.factory.HandlerFactory;
import com.wangxinyuchuan.demo.template.AbstractHandler;
import org.springframework.stereotype.Component;

@Component
public class PersonHandler extends AbstractHandler {



    @Override
    public void afterPropertiesSet() throws Exception {
        HandlerFactory.register("person", this);
    }

    @Override
    public void AA(String nickName) {
        System.out.println("PersonHandler---AA：" + nickName);
    }

    @Override
    public void BB(String nickName) {
        System.out.println("PersonHandler---BB：" + nickName);
    }
}
